/*     */ package com.lmpop.trade.ti_caseBid;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ 
/*     */ public class Ti_caseBidInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */ 
/*     */   public Ti_caseBidInfo()
/*     */   {
/*  16 */     this.queryList = new QueryList();
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  21 */     Ti_caseBid ti_caseBid = new Ti_caseBid();
/*  22 */     String result_code = "0";
/*     */     try {
/*  24 */       insert(dbmMgr, ti_caseBid);
/*     */     } catch (ApplicationException e) {
/*  26 */       e.printStackTrace();
/*  27 */       result_code = "1";
/*     */     }
/*  29 */     map.setString("result_code", result_code);
/*  30 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_caseBid ti_admin) throws ApplicationException
/*     */   {
/*  35 */     dbmMgr.update("insertTi_caseBid", ti_admin);
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  40 */     String pkid_string = map.getString("pkid");
/*  41 */     String result_code = "0";
/*     */     try {
/*  43 */       if (!pkid_string.equals("")) {
/*  44 */         String[] pkStr = pkid_string.split("\\|");
/*  45 */         for (int i = 0; i < pkStr.length; i++) {
/*  46 */           if (pkStr[i].equals("")) continue; delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/*  50 */       e.printStackTrace();
/*  51 */       result_code = "1";
/*     */     }
/*  53 */     map.setString("result_code", result_code);
/*  54 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid) throws ApplicationException {
/*  58 */     dbmMgr.update("deleteTi_caseBid", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  63 */     Ti_caseBid ti_admin = new Ti_caseBid();
/*     */ 
/*  66 */     String result_code = "0";
/*     */     try {
/*  68 */       update(dbmMgr, ti_admin);
/*     */     } catch (ApplicationException e) {
/*  70 */       e.printStackTrace();
/*  71 */       result_code = "1";
/*     */     }
/*  73 */     map.setString("result_code", result_code);
/*  74 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_caseBid ti_admin) throws ApplicationException
/*     */   {
/*  79 */     dbmMgr.update("updateTi_caseBid", ti_admin);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/*  86 */     Ti_caseBid ti_caseBid = (Ti_caseBid)obj;
/*  87 */     if (start == 0)
/*  88 */       start = 0;
/*     */     else {
/*  90 */       start = (start - 1) * limit;
/*     */     }
/*     */ 
/*  93 */     ti_caseBid.setStart(Integer.valueOf(start));
/*  94 */     ti_caseBid.setLimit(Integer.valueOf(limit));
/*     */ 
/*  96 */     return this.queryList.getList("getTi_caseBidList", ti_caseBid);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 101 */     Ti_caseBid ti_caseBid = (Ti_caseBid)obj;
/* 102 */     List list = this.queryList.getList("getTi_caseBidCount", ti_caseBid);
/* 103 */     int count = 0;
/* 104 */     if ((list != null) && (list.size() > 0)) {
/* 105 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 106 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 107 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 110 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk) {
/* 114 */     return this.queryList.getList("getTi_caseBidByPk", pk);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_caseBid.Ti_caseBidInfo
 * JD-Core Version:    0.6.0
 */